﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ShenHePager.aspx.cs" Inherits="House客户端.ShenHePager" %>

<!DOCTYPE html>
<html>
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>初审页面</title>
    <link href="jquery-easyui-1.5.2/themes/default/easyui.css" rel="stylesheet" />
    <link href="easyui/css/wu.css" rel="stylesheet" />
    <link href="easyui/css/icon.css" rel="stylesheet" />
</head>
<body>
    <form id="form1" runat="server">
        <div class="easyui-panel" fit="true" style="border: none;">
            <div style="margin-left: 30px;" id="ff">
                <table>
                    <tr>
                        <td>审核意见：</td>
                        <td style="padding-left: 50px;">
                            <input class="easyui-validatebox" id="Comments" type="text" style="width: 800px;" data-options="required:true" />
                        </td>
                    </tr>
                </table>
            </div>
            <div style="text-align: center; padding: 5px">
                <a href="#" class="easyui-linkbutton" onclick="submitForm()">初审通过</a>
                <a href="#" class="easyui-linkbutton" onclick="submitForm2()">初审驳回</a>
            </div>
        </div>
    </form>
    <script src="jquery-easyui-1.5.2/jquery.min.js"></script>
    <script src="jquery-easyui-1.5.2/jquery.easyui.min.js"></script>
    <script src="jquery-easyui-1.5.2/locale/easyui-lang-zh_CN.js"></script>
    <script src="jquery-easyui-1.5.2/easyloader.js"></script>
    <script src="jquery-easyui-1.5.2/jquery.params.js"></script>
    <script src="jquery-easyui-1.5.2/Common.js"></script>
    <script>
        //审核通过
        function submitForm() {
            var Comments = document.getElementById("Comments").value;
            var ProjectNumber = $.query.get("ProjectNumber");
            $.ajax({
                type: "Post",
                url: WebApiURL + "api/Examine/ExamineUpdate",
                data: {
                    ProjectNumber: ProjectNumber,
                    Auditing_Opinion: Comments,
                    Auditing_State: 5,
                    Auditing_Type: 5
                },
                success: function (data) {
                    if (data == 1) {
                        $.messager.alert("审核失败")
                        location.href = "ExamineList.aspx";
                    }
                    if (data == 2) {
                        $.messager.alert("审核通过");
                        location.href = "ExamineList.aspx";
                    }
                    if (data == 3) {
                        $.messager.alert("审核失败");
                        location.href = "ExamineList.aspx";
                    }
                }
            });
        }
        //审核不通过
        function submitForm2() {
            var Comments = document.getElementById("Comments").value;
            var ProjectNumber = $.query.get("ProjectNumber");
            $.ajax({
                type: "Post",
                url: WebApiURL + "api/Examine/ExamineUpdate",
                data: {
                    ProjectNumber: ProjectNumber,
                    Auditing_Opinion: Comments,
                    Auditing_State: 4,
                    Auditing_Type: 4
                },
                success: function (data) {
                    if (data == 1) {
                        $.messager.alert("审核失败")
                        location.href = "ExamineList.aspx";
                    }
                    if (data == 2) {
                        $.messager.alert("审核不通过");
                        location.href = "ExamineList.aspx";
                    }
                    if (data == 3) {
                        $.messager.alert("审核失败");
                        location.href = "ExamineList.aspx";
                    }
                }
            });
        }
    </script>
</body>
</html>
